Skip to content

Fix for Aspire.Deployment.EndToEnd.Tests.TypeScriptJavaScriptHostingDeploymentTests.DeployTypeScriptStaticWebsiteWithNodeApiToAzureContainerApps - #17434

Merged
Mitch Denny (mitchdenny) merged 3 commits into
mainfrom
copilot/fix-ts-js-hosting-apphost-mts
May 25, 2026
Merged

Mitch Denny (mitchdenny) merged 3 commits into
mainfrom
copilot/fix-ts-js-hosting-apphost-mts

Conversation

@mitchdenny

Copy link
Copy Markdown
Member

⚠️ This PR was created automatically by a workflow analyzing Deployment E2E test failures on main. It is intentionally opened as a draft so a human can review the fix before merging.

Fix for Aspire.Deployment.EndToEnd.Tests.TypeScriptJavaScriptHostingDeploymentTests.DeployTypeScriptStaticWebsiteWithNodeApiToAzureContainerApps

Fixes #17429

Problem

The test fails with:

System.InvalidOperationException : Command failed with non-zero exit code
    (detected ERR prompt at sequence 10).

The terminal recording shows aspire deploy completes in 97 ms with
4/4 steps succeeded and zero actual resources provisioned, then:

ERROR: (ResourceGroupNotFound) Resource group 'e2e-ts-js-hosting-<runid>-1' could not be found.
[ERR:1] $

Root Cause

Since PR #16984 ("Use mts for TypeScript AppHosts"),
aspire init --language typescript creates apphost.mts, not apphost.ts.
The test was writing its custom AppHost content to apphost.ts, which is
ignored. aspire deploy ran against the empty default apphost.mts,
provisioned nothing, and the verification step failed because the resource
group was never created.

Fix

Write the custom AppHost content to apphost.mts, overwriting the
init-generated empty file so it is actually deployed.

Verification

CI on this PR will run the standard build. After CI is green, the
/deployment-test command will be triggered to re-run the affected
deployment E2E test against Azure and confirm the fix.

Since PR #16984 ("Use mts for TypeScript AppHosts"),
`aspire init --language typescript` creates apphost.mts (not apphost.ts).
The test was writing its custom AppHost content to apphost.ts which was
silently ignored: `aspire deploy` ran against the empty default apphost.mts
(4/4 steps succeeded in ~97ms), no Azure resources were provisioned, and the
verification step failed with "Resource group not found".

Write the custom AppHost content to apphost.mts so it overwrites the
init-generated file and is actually deployed.

Fixes #17429

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented May 24, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17434

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17434"

@mitchdenny

Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #17434...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions
github-actions Bot had a problem deploying to deployment-testing May 24, 2026 03:47 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 24, 2026 03:47 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 24, 2026 03:47 Failure
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 24, 2026 03:47 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot had a problem deploying to deployment-testing May 24, 2026 03:47 Failure
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
@github-actions
github-actions Bot temporarily deployed to deployment-testing May 24, 2026 03:47 Inactive
apphost.mts imports the generated SDK as './.aspire/modules/aspire.mjs',
not aspire.js (which is only emitted for the legacy apphost.ts compat
shape, into ./.modules/). The previous fix renamed the file to .mts but
left the .js import unchanged, so the TypeScript compiler failed with
TS2307 and aspire deploy errored before provisioning anything.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@github-actions

Copy link
Copy Markdown
Contributor

❓ CLI E2E Tests unknown — 96 passed, 0 failed, 5 unknown (commit b1f22d0)

View all recordings
Status Test Recording
✅ AddPackageInteractiveWhileAppHostRunningDetached ✅ ▶️ View recording
✅ AddPackageWhileAppHostRunningDetached ✅ ▶️ View recording
✅ AgentCommands_AllHelpOutputs_AreCorrect ✅ ▶️ View recording
✅ AgentInitCommand_DefaultSelection_InstallsDefaultSkills ✅ ▶️ View recording
✅ AgentInitCommand_MigratesDeprecatedConfig ✅ ▶️ View recording
❔ AgentMcpListStructuredLogsFromStarterAppCore ❔ ▶️ View recording
✅ AllPublishMethodsBuildDockerImages ✅ ▶️ View recording
✅ AspireAddPackageVersionToDirectoryPackagesProps ✅ ▶️ View recording
✅ AspireInitSingleFileAppHostRunsViaDotnetRunAppHost ✅ ▶️ View recording
✅ AspireInitWithExistingAppHostDirRecreatesMissingNuGetConfigAndPreservesFiles ✅ ▶️ View recording
❔ AspireInitWithSolutionFileGeneratesAppHostThatBuildsAgainstChannelHive ❔ ▶️ View recording
✅ AspireStartUpdatesStaleTypeScriptAppHostPath ✅ ▶️ View recording
✅ AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ✅ ▶️ View recording
✅ AspireUpdateRemovesOrphanAppHostPackageVersionWhenSdkAlreadyCurrent ✅ ▶️ View recording
✅ Banner_DisplayedOnFirstRun ✅ ▶️ View recording
✅ Banner_DisplayedWithExplicitFlag ✅ ▶️ View recording
✅ Banner_NotDisplayedWithNoLogoFlag ✅ ▶️ View recording
✅ CertificatesClean_RemovesCertificates ✅ ▶️ View recording
✅ CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ✅ ▶️ View recording
✅ CertificatesTrust_WithUntrustedCert_TrustsCertificate ✅ ▶️ View recording
✅ ConfigSetGet_CreatesNestedJsonFormat ✅ ▶️ View recording
✅ CreateAndRunAspireStarterProject ✅ ▶️ View recording
✅ CreateAndRunAspireStarterProjectWithBundle ✅ ▶️ View recording
✅ CreateAndRunEmptyAppHostProject ✅ ▶️ View recording
✅ CreateAndRunJavaEmptyAppHostProject ✅ ▶️ View recording
✅ CreateAndRunJsReactProject ✅ ▶️ View recording
✅ CreateAndRunPythonReactProject ✅ ▶️ View recording
✅ CreateAndRunTypeScriptEmptyAppHostProject ✅ ▶️ View recording
✅ CreateAndRunTypeScriptStarterProject ✅ ▶️ View recording
✅ CreateJavaAppHostWithViteApp ✅ ▶️ View recording
✅ CreateTypeScriptAppHostWithViteApp_UsesConfiguredToolchain ✅ ▶️ View recording
❔ DashboardRunWithAgentMcpCore ❔ ▶️ View recording
❔ DashboardRunWithOtelTracesReturnsNoTracesCore ❔ ▶️ View recording
✅ DeployK8sBasicApiService ✅ ▶️ View recording
✅ DeployK8sWithExternalHelmChart ✅ ▶️ View recording
✅ DeployK8sWithGarnet ✅ ▶️ View recording
✅ DeployK8sWithMongoDB ✅ ▶️ View recording
✅ DeployK8sWithMySql ✅ ▶️ View recording
✅ DeployK8sWithPostgres ✅ ▶️ View recording
✅ DeployK8sWithRabbitMQ ✅ ▶️ View recording
✅ DeployK8sWithRedis ✅ ▶️ View recording
✅ DeployK8sWithSqlServer ✅ ▶️ View recording
✅ DeployK8sWithValkey ✅ ▶️ View recording
✅ DeployTypeScriptAppToKubernetes ✅ ▶️ View recording
✅ DescribeCommandResolvesReplicaNames ✅ ▶️ View recording
✅ DescribeCommandShowsRunningResources ✅ ▶️ View recording
✅ DetachFormatJsonProducesValidJson ✅ ▶️ View recording
✅ DetachFormatJsonProducesValidJsonWhenRestartingExistingInstance ✅ ▶️ View recording
✅ DoListStepsShowsPipelineSteps ✅ ▶️ View recording
✅ DocsCommand_RendersInteractiveMarkdownFromLocalSource ✅ ▶️ View recording
✅ DoctorCommand_DetectsDeprecatedAgentConfig ✅ ▶️ View recording
✅ DoctorCommand_TypeScriptAppHostReportsMissingConfiguredToolchain ✅ ▶️ View recording
✅ DoctorCommand_WithSslCertDir_ShowsTrusted ✅ ▶️ View recording
✅ DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ✅ ▶️ View recording
✅ GeneratedAspireDevScript_StartsWatchMode_WithConfiguredToolchain ✅ ▶️ View recording
✅ GlobalMigration_HandlesCommentsAndTrailingCommas ✅ ▶️ View recording
✅ GlobalMigration_HandlesMalformedLegacyJson ✅ ▶️ View recording
✅ GlobalMigration_PreservesAllValueTypes ✅ ▶️ View recording
✅ GlobalMigration_SkipsWhenNewConfigExists ✅ ▶️ View recording
✅ GlobalSettings_MigratedFromLegacyFormat ✅ ▶️ View recording
✅ InitTypeScriptAppHost_AugmentsExistingViteRepoAtRoot ✅ ▶️ View recording
✅ InteractiveCSharpInitCreatesExpectedFiles ✅ ▶️ View recording
✅ InvalidAppHostPathWithComments_IsHealedOnRun ✅ ▶️ View recording
✅ JavaScriptHostingApisRunFromTypeScriptAppHost ✅ ▶️ View recording
✅ LatestCliCanStartStableChannelAppHost ✅ ▶️ View recording
✅ LatestCliCanStartStableChannelTypeScriptAppHost ✅ ▶️ View recording
✅ LegacySettingsMigration_AdjustsRelativeAppHostPath ✅ ▶️ View recording
✅ LogLevelTrace_ProducesTraceEntriesInCliLogFile ✅ ▶️ View recording
✅ LogsCommandShowsResourceLogs ✅ ▶️ View recording
✅ OtelLogsReturnsStructuredLogsFromStarterApp ✅ ▶️ View recording
✅ OtelLogsReturnsStructuredLogsFromStarterAppIsolated ✅ ▶️ View recording
✅ PsCommandListsRunningAppHost ✅ ▶️ View recording
✅ PsFormatJsonOutputsOnlyJsonToStdout ✅ ▶️ View recording
✅ PublishJavaScriptPatternsGeneratesExpectedDockerComposeArtifacts ✅ ▶️ View recording
✅ PublishWithConfigureEnvFileUpdatesEnvOutput ✅ ▶️ View recording
✅ PublishWithDockerComposeServiceCallbackSucceeds ✅ ▶️ View recording
✅ PublishWithoutOutputPathUsesAppHostDirectoryDefault ✅ ▶️ View recording
✅ ResourceCommand_FailedExecution_DisplaysAppHostLogPathAndLogContainsEntries ✅ ▶️ View recording
✅ ResourceCommand_FailsWhenInteractionServiceIsRequired ✅ ▶️ View recording
✅ ResourceCommand_SetAndDeleteParameterUpdatesDescribeOutput ✅ ▶️ View recording
✅ RestoreGeneratesSdkFiles ✅ ▶️ View recording
✅ RestoreGeneratesSdkFiles_WithConfiguredToolchain ✅ ▶️ View recording
✅ RestoreRefreshesGeneratedSdkAfterAddingIntegration ✅ ▶️ View recording
✅ RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes ✅ ▶️ View recording
✅ RunFromParentDirectory_UsesExistingConfigNearAppHost ✅ ▶️ View recording
❔ RunPublishFailureScenarioAsync ❔ ▶️ View recording
✅ RunReportsSyntaxErrorsForDotNetAppHost ✅ ▶️ View recording
✅ RunReportsSyntaxErrorsForTypeScriptAppHost ✅ ▶️ View recording
✅ SecretCrudOnDotNetAppHost ✅ ▶️ View recording
✅ SecretCrudOnTypeScriptAppHost ✅ ▶️ View recording
✅ StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ✅ ▶️ View recording
✅ StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets ✅ ▶️ View recording
✅ StartReportsSyntaxErrorsForDotNetAppHost ✅ ▶️ View recording
✅ StartReportsSyntaxErrorsForTypeScriptAppHost ✅ ▶️ View recording
✅ StopAllAppHostsFromAppHostDirectory ✅ ▶️ View recording
✅ StopJavaPolyglotAppHostUsingApphostDirectory ✅ ▶️ View recording
✅ StopNonInteractiveSingleAppHost ✅ ▶️ View recording
✅ StopTypeScriptPolyglotAppHostUsingApphostDirectory ✅ ▶️ View recording
✅ StopWithNoRunningAppHostExitsSuccessfully ✅ ▶️ View recording
✅ UnAwaitedChainsCompileWithAutoResolvePromises ✅ ▶️ View recording
✅ UpdateProjectChannelToStable_TypeScript_PicksUpStablePackages ✅ ▶️ View recording

📹 Recordings uploaded automatically from CI run #26373319212

@mitchdenny

Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #17434...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@mitchdenny

Copy link
Copy Markdown
Member Author

/deployment-test

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #17434...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions

Copy link
Copy Markdown
Contributor

❌ Deployment E2E Tests failed — 39 passed, 1 failed, 0 cancelled

View test results and recordings

View workflow run

Test Result Recording
Deployment.EndToEnd-AzureLogAnalyticsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCompactNamingDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureServiceBusDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureEventHubsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-KubernetesGatewayTlsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureStorageDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-KubernetesHelmChartDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetSqlServerConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-TypeScriptVnetSqlServerInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-TypeScriptAzureContainerAppJobDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-TypeScriptJavaScriptHostingDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-NspStorageKeyVaultDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureContainerRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetKeyVaultConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-TypeScriptExpressDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AzureAppConfigDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaExistingRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AuthenticationTests ✅ Passed
Deployment.EndToEnd-AksAzureKubernetesEnvironmentGatewayDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksBlazorRedisDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksStarterWithRedisHelmDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksAzureKubernetesEnvironmentCertManagerDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksAzureKubernetesEnvironmentCertManagerTypeScriptDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaDeploymentErrorOutputTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksMultipleNodePoolsDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksWithAzureResourcesDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksVnetWithAzureResourcesDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaStarterDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaManagedRedisDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksVnetInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobConnectivityDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-VnetStorageBlobInfraDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AppServiceReactDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AcaCustomRegistryDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-AksWithHelmChartDeploymentTests ✅ Passed ▶️ View Recording
Deployment.EndToEnd-FrontDoorDeploymentTests ❌ Failed ▶️ View Recording

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Straightforward fix — all three tests correctly updated to write apphost.mts (matching the new aspire init output from PR #16984) and use the aspire.mjs import path for ESM module resolution.

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

Decision: docs_required → already documented by name

The single triggered signal (pr_body_has_cli_flag_mention) is a false positive — the PR body mentions aspire init --language typescript only to explain the root cause of a broken test, not to introduce a new flag.

All 3 changed files are under tests/ (only_test_or_build_changes: true). The target branch release/13.4 on microsoft/aspire.dev already fully documents the behavior:

  • src/frontend/src/content/docs/extensibility/multi-language-integration-authoring.mdx line 554: `aspire init --language typescript` creates apphost.mts
  • Same file lines 398, 529, 575–577: all code examples correctly use apphost.mts
  • src/frontend/src/content/docs/app-host/typescript-apphost.mdx lines 19, 36, 51, 73, 129–143: fully updated to apphost.mts throughout

No documentation gap exists for this test-only fix.

This branch was previously deployed

1 inactive deployment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-deployment area-polyglot Issues related to polyglot apphosts

Projects

None yet

3 participants